package com.lingyu.jsjx.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.common.datascope.annotation.DataScope;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lingyu.jsjx.mapper.SocialServiceMapper;
import com.lingyu.jsjx.domain.SocialService;
import com.lingyu.jsjx.service.ISocialServiceService;

/**
 * 社会服务档案Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-08
 */
@Service
public class SocialServiceServiceImpl  extends ServiceImpl<SocialServiceMapper, SocialService> implements ISocialServiceService
{
    @Autowired
    private SocialServiceMapper socialServiceMapper;

    /**
     * 查询社会服务档案
     * 
     * @param serviceId 社会服务档案主键
     * @return 社会服务档案
     */
    @Override
    public SocialService selectSocialServiceByServiceId(Long serviceId)
    {
        return socialServiceMapper.selectSocialServiceByServiceId(serviceId);
    }

    /**
     * 查询社会服务档案列表
     * 
     * @param socialService 社会服务档案
     * @return 社会服务档案
     */
    @Override
    @DataScope(deptAlias = "u", userAlias = "ss",type = "jsjx")
    public List<SocialService> selectSocialServiceList(SocialService socialService)
    {
        return socialServiceMapper.selectSocialServiceList(socialService);
    }

    /**
     * 新增社会服务档案
     * 
     * @param socialService 社会服务档案
     * @return 结果
     */
    @Override
    public int insertSocialService(SocialService socialService)
    {
        return baseMapper.insert(socialService);
    }

    /**
     * 修改社会服务档案
     * 
     * @param socialService 社会服务档案
     * @return 结果
     */
    @Override
    public int updateSocialService(SocialService socialService)
    {

        return baseMapper.updateById(socialService);
    }

    /**
     * 批量删除社会服务档案
     * 
     * @param serviceIds 需要删除的社会服务档案主键
     * @return 结果
     */
    @Override
    public int deleteSocialServiceByServiceIds(Long[] serviceIds)
    {
        return socialServiceMapper.deleteSocialServiceByServiceIds(serviceIds);
    }

    /**
     * 删除社会服务档案信息
     * 
     * @param serviceId 社会服务档案主键
     * @return 结果
     */
    @Override
    public int deleteSocialServiceByServiceId(Long serviceId)
    {
        return baseMapper.deleteById(serviceId);
    }
}
